
import br.com.java.Ecommerce.HibernateUtil;
import org.hibernate.Session;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author denis
 */
public class Conecta {
    
    public static void main(String[] args)
    {
        Session session = null;
        try
        {
            session = HibernateUtil.getSessionFactory().openSession();
            System.out.println("Conectado");
        }
        finally
        {
            session.close();
            System.out.println("Fechou conexão");
        }
    }
    
}
